package com.ossjk.oa.system.mapper;

import java.util.List;

import com.ossjk.oa.system.vo.EmpDeptVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.ossjk.oa.system.entity.Employee;
import com.ossjk.oa.system.vo.EmpVo;
import com.ossjk.oa.system.vo.EmployeeVo;

/**
 * <p>
 * 员工表 Mapper 接口
 * </p>
 *
 * @author chair
 * @since 2019-01-14
 */
public interface EmployeeMapper extends BaseMapper<Employee> {

	List selectVoPage(Page page, @Param("ew") Wrapper wrapper);

	EmployeeVo selectVo(@Param("ew") Wrapper wrapper);

	List selectVoList(@Param("ew") Wrapper wrapper);

	@Select("select id, rname,pname, did, dname  from v_emp2dept where id=#{id}")
	EmpVo selectOneVoByID(@Param("id") String id      );

	@Select("select id, rname,pname, did, dname  from v_emp2dept where did=#{did}")
	List<EmpVo> selectEmpVosByDid(@Param("did") String did    );

	List<EmpDeptVo> selectEmpDept(@Param("ew") Wrapper wrapper);

}
